package model;

import connection.DbConnection;
import bean.PollUser;
import java.sql.*;
import java.util.ArrayList;

public class DeleteMasterImpl {
	
	/**
	 * Sets all PollUser javabean attributes from database (even if empty in database).
	 * 
	 * @param user is PollUser bean
	 */
		
		private static PreparedStatement st;
		private static Connection conn;
		private static ResultSet rs;
			
		public void deleteMaster(PollUser user){
			
			
			try{
				rs = null;
				conn = new DbConnection().getConn();
				st = conn.prepareStatement("DELETE FROM Polluser WHERE username =  '" + user.getUsername() + "'");
				rs=st.executeQuery();	
				
				
				
			}catch(Exception e){
				e.printStackTrace();
			}
			
					
						
			
		}

		


	
}
